
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <h1 align ="center"> Modificar datos del Docente</h1>
        <?php
        include("/ConexionDB/conectar.php");
        $link = Conectarse();
        $cedulaModificar=$_GET["cedula"];
        $consulta="select * from docente where cedula='$cedulaModificar'";
        $resConsulta = pg_exec($link, $consulta);
        $datos = pg_fetch_array($resConsulta);
        ?>
        <FORM ACTION="actualizarRegistroDocente.php" method="post" enctype="multipart/form-data">
            
            <TABLE border="1">                
                <TR>
                    <TD>Cedula:</TD>
                    <TD><INPUT TYPE="text" NAME="cedula" SIZE="10" MAXLENGTH="10" required ="si" value="<?php echo $datos[0] ?>"</TD>
                </TR>
                <TR>
                    <TD>Nombres:</TD>
                    <TD><INPUT TYPE="text" NAME="nombres" SIZE="20" MAXLENGTH="30" required ="si" value="<?php echo $datos[1] ?>"></TD>
                </TR>
                <TR>
                    <TD>Apellidos:</TD>
                    <TD><INPUT TYPE="text" NAME="apellidos" SIZE="20" MAXLENGTH="30" required ="si" value="<?php echo $datos[2] ?>"></TD>
                </TR>
                <TD>Fecha de Nac:</TD>
                <TD><input required ="si"  name="fechaNac" type="text" id="fechaNac" onClick="popUpCalendar(this, form1.fechaNac, 'yyyy-mm-dd'); "size="12" value="<?php echo $datos[3] ?>"></TD>
                </TR>

                <TR>
                    <TD>Edad:</TD>
                    <TD><INPUT required ="si" TYPE="text" NAME="edad" SIZE="1" MAXLENGTH="2" value="<?php echo $datos[4] ?>"></TD>
                </TR>

                <TR>
                    <TD>Sexo:</TD>
                    <TD>
                        <select required ="si"  name="sexo" id="sexo" value="<?php echo $datos[5] ?>">
                            <option>M</option>
                            <option>F</option>
                        </select>
                </TR>
                <TR>
                    <TD>Nacionalidad:</TD>
                    <TD><INPUT required ="si" TYPE="text" NAME="nacionalidad" SIZE="20" MAXLENGTH="30" value="<?php echo $datos[6] ?>"></TD>
                </TR>

                <TR>
                    <TD>Telefono:</TD>
                    <TD><INPUT required ="si" TYPE="text" NAME="telefono" SIZE="20" MAXLENGTH="30" value="<?php echo $datos[7] ?>"></TD>
                </TR>

                <TR>
                    <TD>Categoria Doc:</TD>
                    <TD>						 
                        <select required ="si" name="categoria" id="sexo" value="<?php echo $datos[8] ?>">
                            <option>Principal</option>
                            <option>Auxiliar</option>
                            <option>Otro</option>
                        </select>
                    </TD>
                </TR>

                <TR>
                    <TD>Direccion:</TD>
                    <TD><INPUT required ="si" TYPE="text" NAME="direccion" SIZE="20" MAXLENGTH="30" value="<?php echo $datos[9] ?>"></TD>
                </TR>
                <TR>
                    <TD>Fecha de Ingreso:</TD>
                    <TD><input required ="si" name="fingreso" type="text" id="fingreso" onClick="popUpCalendar(this, form1.fingreso, 'yyyy-mm-dd');" size="10" value="<?php echo $datos[10] ?>"></TD>
                </TR> 

                <TR>
                    <TD>foto:</TD>
                    <TD><INPUT TYPE="text" NAME="foto" SIZE="20" MAXLENGTH="30" value="<?php echo $datos[11] ?>"></TD>
                </TR>				
            </TABLE>
            <INPUT TYPE="submit" NAME="accion" VALUE="Modificar">
            <?php pg_close($link) ?>
        </FORM>
    </body>
</html>
